<template>
  <div class="content">
    <ul>
      <li @click="$router.push('/home/list')">租房列表</li>
      <li @click="$router.push('/home/add')">新增租房</li>
    </ul>
  </div>
</template>

<script>
import { mapActions } from 'vuex';
export default {
  created() {
    console.log("NIHAO ");
    this.showList()
  },
  methods: {
    ...mapActions({
      updateRentInfo: "rentInfo/updateRentInfo",
    }),
    showList() {
      this.updateRentInfo();
    },
  },
};
</script>

<style lang="less" scoped>
.content {
  width: 200px;
  height: 100vh;
  background: #545c64;
  ul {
    li {
      text-align: center;
      color: #fff;
      height: 50px;
      line-height: 50px;
      border-bottom: 2px dashed #fff;
      cursor: pointer;
      &:hover {
        background: #42494e;
      }
    }
  }
}
</style>